define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'notify/index',
        add_url: 'notify/add',
        edit_url: 'notify/edit',
        delete_url: 'notify/delete',
        export_url: 'notify/export',
        modify_url: 'notify/modify',
    };

    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                toolbar: ['refresh'],
                cols: [[
                    {field: 'id', title: 'ID', width: 80},
                    {field: 'types', selectList: {1:"返沙人员体温通知", 2:"疫苗接种异常通知", 3:"购药人员体温通知", 4:"集中隔离人员体温通知", 5:"核酸检测通知"}, title: '通知类型'},
                    {field: 'id_card', title: '身份证号'},
                    {field: 'mobile', title: '手机号'},
                    {field: 'community', title: '所属社区', selectList: getCommunityList, width: 150},
                    {field: 'create_time', title: '发送时间'},
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});